package com.znsd.stu.service.impl;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.znsd.entitys.Leave;
import com.znsd.stu.dao.LeaveDao;
import com.znsd.stu.service.LeaveService;
@Service
public class LeaveServiceImpl implements LeaveService {
	@Autowired
	private LeaveDao leaveDao;

	@Override
	public Integer addLeave(Leave leave) {
		leave.setApply_time(new Date());
		return leaveDao.addLeave(leave);
	}

	@Override
	public Integer queryLimitUserLeaveCount(Integer integer) {
		return leaveDao.queryLimitUserLeaveCount(integer);
	}

	@Override
	public List<Leave> queryLimitUserLeave(Integer user_id, Integer pageIndex, Integer limit) {
		return leaveDao.queryLimitUserLeave(user_id,pageIndex,limit);
	}

	@Override
	public Integer updateQuxiao(Integer id) {
		return leaveDao.updateQuxiao(id);
	}

	
}
